package com.junzhiit.nengji.model.enums;

import com.bainaeco.framework.exception.InvalidArgumentException;

public enum UserEvaluateSeachStatus {
	
	ALL(0,"所有"),
	HASIMG(1,"有图"),
	AGAIN(2,"追评"),
	NEW(3,"最新"),;
	
	private Integer status;
	
	private String value;

	private UserEvaluateSeachStatus(Integer status,String value){
		this.status = status;
		this.value = value;
	}

	public int toIntStatus() {
		return this.status;
	}
	
	public String toStringValue() {
		return this.value;
	}

	public static UserEvaluateSeachStatus toFlag(int status) {
		if (ALL.status == status) {
			return ALL;
		} else if (HASIMG.status == status) {
			return HASIMG;
		} else if (AGAIN.status == status) {
			return AGAIN;
		} else if (NEW.status == status) {
			return NEW;
		}else {
			throw new InvalidArgumentException("Unknown status[" + status + "].");
		}
	}
}
